<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	template="/WEB-INF/templates/default.xhtml"
	xmlns:a4j="http://richfaces.org/a4j">


	<ui:define name="content">

		<script type="text/javascript">       
     	window.onload = function() {
       		document.getElementById('loginForm:username').focus();
     	}
   		</script>


		<h:form id="loginForm">
			<a4j:region>
				<rich:panel style="width:450px; margin:auto;">
					<f:facet name="header">Logowanie</f:facet>
					<br />

					<p>Zaloguj się!</p>
					<br/>

					<h:messages styleClass="formMessage" />
					<div class="dialog">



						<h:panelGrid columns="2">


							<h:outputLabel for="username">Mail:</h:outputLabel>
							<h:inputText id="username"
								value="#{permissionManagement.username}" />
							<h:outputLabel for="password">Hasło:</h:outputLabel>
							<h:inputSecret id="password"
								value="#{permissionManagement.password}" />

						</h:panelGrid>
					</div>
					<br/>
					<div class="actionButtons">
						<a4j:commandButton id="submit" value="Zaloguj" type="submit"
							render="loginForm" action="#{permissionManagement.login()}" />
					</div>
					<br />
					<br />
					<br />
					<div>
						<h:commandLink action="/resetHasla.xhtml"
							value="Nie pamiętam hasła" />
					</div>
					
					<br/>
					
				</rich:panel>


			</a4j:region>
		</h:form>




	</ui:define>
</ui:composition>